package com.luhuiguo.cms.client;

import com.extjs.gxt.ui.client.GXT;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;
import com.luhuiguo.cms.client.gin.Injector;
import com.luhuiguo.cms.client.presenter.AppPresenter;

public class CMS implements EntryPoint {

    private final Injector injector = GWT.create(Injector.class);
    
    public void onModuleLoad() {
        
        
        GlobalResources.INSTANCE.css().ensureInjected();
        
        AppPresenter appPresenter = injector.getAppPresenter();
        appPresenter.bind();

        RootPanel.get().add(appPresenter.getDisplay().asWidget());
        
        GXT.hideLoadingPanel("loading");
    }
}
